lin{1}='-'; lin{2}='--'; lin{3}='-.'; lin{4}='-x'; lin{5}='-o';
yy=2012:2022;
%Data is manually collected from Eikon 
%Data 2012-2023
subplot(3,1,1)
esg=[3306145146 7300433091 21528796256 50208924547 1.14112E+11 2.02869E+11 3.04215E+11 5.13292E+11 7.68339E+11 1.3826E+12 1.88178E+12 2.29909E+12];
gb=[311770566 3776058511 16855119299 43721975916 1.06043E+11 1.90648E+11 2.82765E+11 4.5541E+11 6.16816E+11 9.57392E+11 1.27367E+12 1.57479E+12];
all=[3.74384E+13 38050381947891 39952423582458 41116541750591 42843971986437 45864248010550 46325310148715 49304996938908 52599212766115 55026452969090 54998196285298 57240491170490];
plot(yy,100*esg(1:end-1)./all(1:end-1),lin{1},'LineWidth',2)
hold on;
plot(yy,100*gb(1:end-1)./all(1:end-1),lin{2},'LineWidth',2)
hold off 
ylabel('Percent of amount outstanding')
legend('ESG bonds','Green bonds','Location','Northwest')
title('Panel A: Corporate bonds globally')
legend('boxoff')
xlim([2012 2022])

%Data is manually collected from Eikon
%Data 2012-2023, first row ESG, second row all bonds
%Hydroelectric & Tidal Utilities
hyd=[0 0 185749312 185749312 1443013350 2658016997 4289534435 8964585496 9965736137 16021418402 22682644013 24085437437;
    41855781462 47013387324 50272289441 55499886379 62892296407 67306951702 68729314120 75473266241 80127962978 78921538988 82290147610 82157293504];
%Auto & Truck Manufacturers
aut=[0 0 0 0 0 0 0 0 0 10858570490 22483308553 30503417144;
    139754361565 162867502000 177971766115 171749499296 185692623206 201276491031 235764834900 254785650214 301659311036 294695457473 285227942662 266771790849];
%Multiline Utilities
mul=[0 1545032169 4839810376 7583527351 9499257134 14179956602 14866885049 20999308975 30875864348 43616136827 53759638465 72368938123;
    292883254245 293119460441 294401091470 313824434703 318011547721 320054304112 330446015201 340110322768 351066714417 364699712800 370328436862 398258854588];
%Electric Utilities
ele=[0 384903565 2184167653 4758140597 15067117759 26447565258 38659151465 67118226342 94620781138 159249250848 219215822550 242612190236;
    1176306811237 1219494412555 1261357322644 1339343617210 1389395309616 1465368706550 1521128395695 1615283438541 1704239290115 1794522922815 1853216173858 1860017763629];
%Integrated Telecommunications Services
int=[0 0 0 0 0 0 0 0 3967209163 12468702057 19038787137 24593577965;
    761840168514 827619596316 882418779198 979838833893 995777097292 1050668724845 1028125872849 1060994614574 1059530658824 1081518220005 986336475167 930562527571];
all=100*[hyd(1,:)./hyd(2,:);aut(1,:)./aut(2,:);mul(1,:)./mul(2,:);ele(1,:)./ele(2,:);int(1,:)./int(2,:)];
subplot(3,1,2)
for i=1:5
    plot(yy,all(i,1:end-1),lin{i},'LineWidth',2)
    hold on;
end
hold off
legend('Hydroelectric & Tidal Utilities','Auto & Truck Manufacturers','Multiline Utilities','Electric Utilities','Integrated Telecommunications Services','Location','NorthWest')
legend('boxoff')
xlim([2012 2022])
title('Panel B: Corporate bonds, sectors globally')
ylabel('Percent of amount outstanding')

%Green bonds
subplot(3,1,3)
nz=[0/1 0/1 0/1 0/1 0/1 3310906626/124315872024];
bela=[0/1 0/1 0/1 0/1 0/1 55231530/3600950631];
dk=[0/1 0/1 0/1 0/1 0/1 2378581053/131609330467];
aut=[0/1 0/1 0/1 0/1 0/1 6837101018/342500870778];
ger=[0/1 0/1 0/1 18565640459/1778330128876 39315473913/1988595295383 48052245894/2139296136120];
all=[nz;bela;dk;aut;ger];
for i=1:5
    plot(2017:2022,100*all(i,:),lin{i},'LineWidth',2)
    hold on;
end
hold off
legend('New Zealand','Belarus','Denmark','Austria','Germany','Location','NorthWest')
legend('boxoff')
xlim([2017 2022])
xticks(2017:2022)
title('Panel C: Government green bonds')
ylabel('Percent of amount outstanding')




